from pyramid_layout.layout import layout_config
from .models.category import Category

@layout_config(name='master',template='myproject:templates/layout.jinja2')
class MasterLayout(object):
    def __init__(self,context,request):
        self.context=context
        self.request=request
        self.categories=request.dbsession.query(Category).filter_by(parent=None).all()